<?php
/**	
*	FILENAME: 		/libraries/database.php
*	DESCRIPTION:	This library defines commonly used functions for interacting with the MyNova Mobile database layer.
*	AUTHOR:			Casey Burkhardt
*	VERSION:		1.0.0
*	LAST MODIFIED:	12/30/2009
**/

require_once($_SERVER["DOCUMENT_ROOT"] . "/config/environment.php");

/**	
*	DESCRIPTION:	Establishes a MySQL database connection using values from the environment configuration.
**/
function connectToDatabase()
{
	// Obtain environment configuration
	$values = getDatabaseInformation();

	// Connect to the MySQL database
    mysql_connect($values["host"], $values["user"], $values["password"]) or die(mysql_error());
    mysql_select_db($values["database"]) or die(mysql_error());
}
?>